package com.canomo.modules.inventory.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.canomo.modules.inventory.entity.Product;
import com.canomo.modules.inventory.dao.ProductDao;
import com.canomo.modules.inventory.service.ProductService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 产品表 服务实现类
 * </p>
 *
 * @author xiaoj
 * @since 2018-07-14
 */
@Service
public class ProductServiceImpl extends ServiceImpl<ProductDao, Product> implements ProductService {


    @Override
    public Page<Product> getProductPage(Page<Product> page, Product product) {
        return page.setRecords(baseMapper.getProductList(page,product));
    }

    @Override
    public Product findProductById(String id) {
        return baseMapper.findProductById(id);
    }
}
